from sys import path
path.append('..')

from Generator     import Generator
from DirectoryWalk import DirectoryWalk

generator = Generator(
  generator="FromImages", n=80, dim=4,
  param=DirectoryWalk('/Users/Shared/alakazam/Pictures/DRIDE/att_faces_small/', 1, '*.pgm', 1),
  noise=0)

generator.generateData()

print generator.data.shape

from Reducer import Reducer

reducer = Reducer(generator.data, algorithm="PCA", outDim=100)

reducer.doReduction()

reducer2 = Reducer(generator.data, algorithm="Isomap", outDim=5, k=3)

reducer2.doReduction()

from OpenGLDataView import OpenGLDataView

OpenGLDataView(reducer2.outData, neighbours=reducer.knn, colors=generator.colors).run()
